<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
//String path = request.getContextPath();
//String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

	String strname=request.getParameter("name");
	String strpass=request.getParameter("pass");
	//name="+document.getElementById("uname")+"&pass="+document.getElementById("pass");
	if(strname.equals("admin") && strpass.equals("123"))
	{     
	     session.setAttribute("name",strname);
		 session.setAttribute("pass",strpass);
		 
		 response.setContentType("text/html; charset=gb2312");
		// response.sendRedirect("main.jsp?name="+strname+"&pass="+strpass);
		  response.sendRedirect("main.jsp");
	}
	else
	{
	     response.setContentType("text/html; charset=gb2312");
		 response.sendRedirect("index.jsp");
	}
%>
